#pragma once
#include <cstdio>
#include <iostream>
#include <vector>
#include <unordered_map>
#include "../user/user.hpp"
#include "../house/base.hpp"
#include "../map/map.hpp"
#include "out.hpp"

std::string GetStdInput();

void MapDisplay(std::vector<Land>& map)
{
	int pos=0;
	std::unordered_map<int, char> hashMap;
	for (int i = 0; i < 29; ++i) {
		PrintWithColor(map[pos].MapColor(),map[pos].MapChar());
		pos++;
	}
	putchar('\n');
	for (int i = 0; i < 6; ++i) {
		PrintWithColor(map[map.size()-i-1].MapColor(),map[map.size()-i-1].MapChar());
		for (int j = 0; j < 27; ++j)
			putchar(' ');
		PrintWithColor(map[pos].MapColor(),map[pos].MapChar());
		pos++;
		putchar('\n');
	}
	for (int i = 63,j=0; i >= 35; --i,j++) {
		PrintWithColor(map[map.size()-7-j].MapColor(),map[map.size()-7-j].MapChar());
	}
	putchar('\n');
}

void MapGameEnd(User& user){
	PrintStd("游戏结束,获胜者为:"+user.GetName()+"\n按任意键退出");
	GetStdInput();
}
